﻿namespace LuckyFish.GitNet.ConsoleServes;

public class GitInfoServer
{
    public string? Location { get; private set; }
    public string? InstallInfo { get; private set; }
    public string? Ver { get; private set; }

    public GitInfoServer()
    {
        var a = TerminalServer.InputOrder("where git");
        Location = a.Split("\r\n")[0];
        if (!string.IsNullOrEmpty(Location))
        {
            InstallInfo = "Is Install";
            Ver = TerminalServer.InputOrder("git --version");
            Ver = Ver.Split("\r\n")[0].Split(" ")[^1];
            return;
        }

        InstallInfo = "Not Install!";
    }
}